import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class One {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        char[] s=br.readLine().toCharArray();
        int begin=-1,len=0,n=s.length;
        for (int i = 0; i < n; i++) {
            if(s[i]>='0'&&s[i]<='9'){
                int j=i;
                while(j<n&&s[j]>='0'&&s[j]<='9')
                    j++;
                if(j-i>len){
                    begin=i;
                    len=j-i;
                }
                i=j;
            }
        }
        for (int i = begin; i < begin + len; i++) {
            System.out.print(s[i]);
        }
    }
}
